2b7283
@@ -93,9 +93,9 @@
public class SoapJaxbDataFormat extends JaxbDataFormat {
     /**
      * Initialize the data format. The serviceInterface is necessary to
      * determine the element name and namespace of the element inside the soap
-     * body when marshaling
+     * body when marshalling
      * 
-     * @param jaxbPackage
+     * @param contextPath
      *            package for JAXB context
      * @param serviceInterface
      *            webservice interface
@@ -104,6 +104,21 @@
public class SoapJaxbDataFormat extends JaxbDataFormat {
         this(contextPath);
         this.elementNameStrategy = elementNameStrategy;
     }
+    
+    /**
+     * Initialize the data format. The serviceInterface is necessary to
+     * determine the element name and namespace of the element inside the soap
+     * body when marshalling
+     * 
+     * @param contextPath
+     *            package for JAXB context
+     * @param elementNameStrategyRef
+     *            webservice interface referenced bean name
+     */
+    public SoapJaxbDataFormat(String contextPath, String elementNameStrategyRef) {
+        this(contextPath);
+        this.elementNameStrategyRef = elementNameStrategyRef;
+    }
 
     public void setElementNameStrategy(Object nameStrategy) {
         if (nameStrategy instanceof ElementNameStrategy) {
@@ -346,6 +361,7 @@
public class SoapJaxbDataFormat extends JaxbDataFormat {
      * Unmarshal a given SOAP xml stream and return the content of the SOAP body
      */
     public Object unmarshal(Exchange exchange, InputStream stream) throws IOException {
+        checkElementNameStrategy(exchange);
         
         String soapAction = getSoapActionFromExchange(exchange);
         
@@ -471,5 +487,10 @@
public class SoapJaxbDataFormat extends JaxbDataFormat {
     public void setElementNameStrategy(ElementNameStrategy elementNameStrategy) {
         this.elementNameStrategy = elementNameStrategy;
     }
+    
+    public void setElementNameStrategyRef(String nameStrategyRef) {
+        this.elementNameStrategyRef = nameStrategyRef;
+    }
 
 }
+
